
from PyQt5.QtWidgets import QApplication, QLabel, QMainWindow, QVBoxLayout, QWidget  ,QDesktopWidget

import sys  
class pyqt_class(QMainWindow): 
    def __init__(self):
        super().__init__()  
        self.control_ids={}
        self.set_val_lst={}
        self.initUI()
    def initUI(self):
        pass
    def set_window(self,*args):
        if len(args)!=5:args=[100,100,400,300,'window_name']
        self.setGeometry(*args[:4])  #100, 100, 400, 300
        self.setWindowTitle(args[4])   #window_name
    def set_label(self,xy=(100,100),title=''):
        control_id=len(self.control_ids)
        self.control_ids[control_id]=QLabel(title, self)   
        self.control_ids[control_id].move(*xy)                
        return control_id
    def set_label_val(self,control_id=None,text='',xy=None,*args,**kwargs):
        if text is not None:
            self.control_ids[control_id].setText(text) 
        if xy is not None:
            self.control_ids[control_id].move(*xy)  
